<%@page
	import="org.springframework.web.context.request.RequestAttributes"%>
<%@page import="org.springframework.web.servlet.ModelAndView"%>
<%@page import="ar.com.sectorwine.controllers.EmpresasController"%>
<%@page import="org.springframework.ui.Model"%>
<%@ page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Stock Cargado</title>
</head>

<body>
	<h1>Stock Cargado</h1>

	<%
		try {
	%>
	<form:form method="post" modelAttribute="mis_stocks">

		<table>
			<tr>
				<td valign="top">
					<table border="1">
						<tr>
							<td align="left">Variedad</td>
							<td align="left">Cantidad</td>
							<td align="left">Creado</td>
							<td align="left">Vencimiento</td>
							<td align="left">Detalles</td>
						</tr>
						<c:forEach items="${mis_stocks}" var="stocks">
						<tr>
							<td align="left">${stocks.variedad}</td>
							<td align="left">${stocks.cantidad}</td>
							<td align="left"><fmt:formatDate value="${stocks.fechaCreacionStock}" pattern="MM/dd/yyyy" timeZone="GMT" /></td>
							<td align="left"><fmt:formatDate value="${stocks.vencimiento}" pattern="MM/dd/yyyy" timeZone="GMT" /></td>
							<td align="left"><a href="stocks_detalle?id=${stocks.id}">VER</a></td>
						</tr>
							
						</c:forEach>

					</table>
				</td>

			</tr>
		</table>

	</form:form>
	------------------------------------------<br>
	<a href="home">inicio</a>
	<%
		} catch (Exception e) {
			out.print(e.getMessage());
		}
	%>
</body>
</html>
